home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / quickrpt.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  45.8 KB  |  1,185 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'quickrpt.pas' rev: 3.00
  6.  
  7. #ifndef quickrptHPP
  8. #define quickrptHPP
  9. #include <qrexpbld.hpp>
  10. #include <QRPrgres.hpp>
  11. #include <qr2const.hpp>
  12. #include <qrprntr.hpp>
  13. #include <DBTables.hpp>
  14. #include <Db.hpp>
  15. #include <Printers.hpp>
  16. #include <Dialogs.hpp>
  17. #include <ExtCtrls.hpp>
  18. #include <Forms.hpp>
  19. #include <DsgnIntf.hpp>
  20. #include <Buttons.hpp>
  21. #include <Graphics.hpp>
  22. #include <SysUtils.hpp>
  23. #include <StdCtrls.hpp>
  24. #include <Controls.hpp>
  25. #include <Classes.hpp>
  26. #include <Windows.hpp>
  27. #include <SysInit.hpp>
  28. #include <System.hpp>
  29.  
  30. //-- user supplied -----------------------------------------------------------
  31.  
  32. namespace Quickrpt
  33. {
  34. //-- type declarations -------------------------------------------------------
  35. typedef System::TMetaClass*TQRNewComponentClass;
  36.  
  37. typedef void __fastcall (__closure *TQROnNeedDataEvent)(System::TObject* Sender, bool &MoreData);
  38.  
  39. enum TQRNotifyOperation { qrMasterDataAdvance, qrBandPrinted, qrBandSizeChange };
  40.  
  41. typedef void __fastcall (__closure *TQRNotifyOperationEvent)(System::TObject* Sender, TQRNotifyOperation 
  42.     Operation);
  43.  
  44. class DELPHICLASS TQRController;
  45. class DELPHICLASS TQRCustomBand;
  46. class DELPHICLASS TQRBasePanel;
  47. class DELPHICLASS TQRFrame;
  48. class PASCALIMPLEMENTATION TQRFrame : public Classes::TPersistent 
  49. {
  50.     typedef Classes::TPersistent inherited;
  51.     
  52. private:
  53.     Graphics::TColor FColor;
  54.     bool FBottom;
  55.     bool FLeft;
  56.     Controls::TControl* FParent;
  57.     TPenStyle FPenStyle;
  58.     bool FRight;
  59.     bool FTop;
  60.     int FWidth;
  61.     void __fastcall SetColor(Graphics::TColor Value);
  62.     void __fastcall SetParent(Controls::TControl* Value);
  63.     void __fastcall SetStyle(Graphics::TPenStyle Value);
  64.     void __fastcall SetValue(int index, bool Value);
  65.     void __fastcall SetWidth(int Value);
  66.     
  67. protected:
  68.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  69.     void __fastcall PaintIt(Graphics::TCanvas* ACanvas, const Windows::TRect &Rect, Extended XFact, Extended 
  70.         YFact);
  71.     void __fastcall SetPen(Graphics::TPen* aPen);
  72.     virtual void __fastcall ReadMode(Classes::TReader* Reader);
  73.     virtual void __fastcall WriteDummy(Classes::TWriter* Writer);
  74.     
  75. public:
  76.     __fastcall TQRFrame(void);
  77.     bool __fastcall AnyFrame(void);
  78.     __property Controls::TControl* Parent = {read=FParent, write=SetParent};
  79.     
  80. __published:
  81.     __property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
  82.     __property bool DrawTop = {read=FTop, write=SetValue, index=0, nodefault};
  83.     __property bool DrawBottom = {read=FBottom, write=SetValue, index=1, nodefault};
  84.     __property bool DrawLeft = {read=FLeft, write=SetValue, index=2, nodefault};
  85.     __property bool DrawRight = {read=FRight, write=SetValue, index=3, nodefault};
  86.     __property Graphics::TPenStyle Style = {read=FPenStyle, write=SetStyle, default=0};
  87.     __property int Width = {read=FWidth, write=SetWidth, default=1};
  88. public:
  89.     /* TPersistent.Destroy */ __fastcall virtual ~TQRFrame(void) { }
  90.     
  91. };
  92.  
  93. enum TQRUnit { MM, Inches, Pixels, Characters, Native };
  94.  
  95. class PASCALIMPLEMENTATION TQRBasePanel : public Extctrls::TCustomPanel 
  96. {
  97.     typedef Extctrls::TCustomPanel inherited;
  98.     
  99. private:
  100.     int FFontSize;
  101.     int FZoom;
  102.     TQRFrame* FFrame;
  103.     TQRFrame* __fastcall GetFrame(void);
  104.     void __fastcall SetFrame(TQRFrame* Value);
  105.     
  106. protected:
  107.     virtual void __fastcall SetZoom(int Value);
  108.     virtual void __fastcall Paint(void);
  109.     virtual void __fastcall PaintRuler(TQRUnit Units);
  110.     void __fastcall PrepareComponents(void);
  111.     void __fastcall UnprepareComponents(void);
  112.     virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
  113.     
  114. public:
  115.     __fastcall virtual TQRBasePanel(Classes::TComponent* AOwner);
  116.     __fastcall virtual ~TQRBasePanel(void);
  117.     __property int Zoom = {read=FZoom, write=SetZoom, nodefault};
  118.     __property int FontSize = {read=FFontSize, write=FFontSize, nodefault};
  119.     
  120. __published:
  121.     __property TQRFrame* Frame = {read=GetFrame, write=SetFrame};
  122. public:
  123.     /* TWinControl.CreateParented */ __fastcall TQRBasePanel(HWND ParentWindow) : Extctrls::TCustomPanel(
  124.         ParentWindow) { }
  125.     
  126. };
  127.  
  128. typedef void __fastcall (__closure *TQRBandAfterPrintEvent)(TQRCustomBand* Sender, bool BandPrinted)
  129.     ;
  130.  
  131. typedef void __fastcall (__closure *TQRBandBeforePrintEvent)(TQRCustomBand* Sender, bool &PrintBand)
  132.     ;
  133.  
  134. class DELPHICLASS TQuickRep;
  135. class DELPHICLASS TQRCreateReportThread;
  136. class PASCALIMPLEMENTATION TQRCreateReportThread : public Classes::TThread 
  137. {
  138.     typedef Classes::TThread inherited;
  139.     
  140. private:
  141.     Qrprntr::TQRPrinter* FQRPrinter;
  142.     TQuickRep* FQuickRep;
  143.     
  144. public:
  145.     __fastcall TQRCreateReportThread(TQuickRep* AReport);
  146.     virtual void __fastcall Execute(void);
  147.     __property TQuickRep* QuickRep = {read=FQuickRep, write=FQuickRep};
  148. public:
  149.     /* TThread.Destroy */ __fastcall virtual ~TQRCreateReportThread(void) { }
  150.     
  151. };
  152.  
  153. class DELPHICLASS TQuickRepBands;
  154. class PASCALIMPLEMENTATION TQuickRepBands : public Classes::TPersistent 
  155. {
  156.     typedef Classes::TPersistent inherited;
  157.     
  158. private:
  159.     TQuickRep* FOwner;
  160.     TQRCustomBand* __fastcall BandInList(Qrprntr::TQRBandType BandType);
  161.     void __fastcall SetBand(Qrprntr::TQRBandType BandType, bool Value);
  162.     TQRCustomBand* __fastcall GetBand(int Index);
  163.     bool __fastcall GetHasBand(int Index);
  164.     void __fastcall SetHasBand(int Index, bool Value);
  165.     
  166. public:
  167.     __fastcall TQuickRepBands(TQuickRep* AOwner);
  168.     __property TQRCustomBand* TitleBand = {read=GetBand, index=1};
  169.     __property TQRCustomBand* PageHeaderBand = {read=GetBand, index=2};
  170.     __property TQRCustomBand* ColumnHeaderBand = {read=GetBand, index=3};
  171.     __property TQRCustomBand* DetailBand = {read=GetBand, index=4};
  172.     __property TQRCustomBand* ColumnFooterBand = {read=GetBand, index=5};
  173.     __property TQRCustomBand* PageFooterBand = {read=GetBand, index=6};
  174.     __property TQRCustomBand* SummaryBand = {read=GetBand, index=7};
  175.     
  176. __published:
  177.     __property bool HasTitle = {read=GetHasBand, write=SetHasBand, stored=false, index=1, nodefault};
  178.     __property bool HasPageHeader = {read=GetHasBand, write=SetHasBand, stored=false, index=2, nodefault
  179.         };
  180.     __property bool HasColumnHeader = {read=GetHasBand, write=SetHasBand, stored=false, index=3, nodefault
  181.         };
  182.     __property bool HasDetail = {read=GetHasBand, write=SetHasBand, stored=false, index=4, nodefault};
  183.     __property bool HasPageFooter = {read=GetHasBand, write=SetHasBand, stored=false, index=6, nodefault
  184.         };
  185.     __property bool HasSummary = {read=GetHasBand, write=SetHasBand, stored=false, index=7, nodefault};
  186.         
  187. public:
  188.     /* TPersistent.Destroy */ __fastcall virtual ~TQuickRepBands(void) { }
  189.     
  190. };
  191.  
  192. typedef void __fastcall (__closure *TQRReportBeforePrintEvent)(TQuickRep* Sender, bool &PrintReport)
  193.     ;
  194.  
  195. class DELPHICLASS TQRDesigner;
  196. class DELPHICLASS TControlHandle;
  197. typedef Shortint THandlePosition;
  198.  
  199. enum THandleOperation { hoCreate, hoParent, hoDestroy, hoMove, hoShow, hoHide };
  200.  
  201. class PASCALIMPLEMENTATION TQRDesigner : public Controls::TControl 
  202. {
  203.     typedef Controls::TControl inherited;
  204.     
  205. private:
  206.     Controls::TControl* FEditControl;
  207.     bool FEditing;
  208.     bool FIsAdding;
  209.     Classes::TNotifyEvent FOnSelectComponent;
  210.     TQuickRep* FReport;
  211.     bool FSizing;
  212.     TControlHandle* Handles[8];
  213.     Windows::TRect MoveRect;
  214.     System::TMetaClass*NewComponentClass;
  215.     THandlePosition SizePosition;
  216.     int SizeStartX;
  217.     int SizeStartY;
  218.     void __fastcall DrawControlHandles(Controls::TControl* Control, bool Visible);
  219.     void __fastcall HandleOperation(THandleOperation Operation);
  220.     void __fastcall SetOnSelectComponent(Classes::TNotifyEvent Value);
  221.     void __fastcall UpdateHandlePositions(Controls::TControl* Control);
  222.     
  223. protected:
  224.     Windows::TRect __fastcall ReleaseFocusFrame(void);
  225.     void __fastcall MoveFocusFrame(const Windows::TRect &Rect);
  226.     virtual void __fastcall SetEditControl(Controls::TControl* AControl);
  227.     void __fastcall SizeBegin(int X, int Y, THandlePosition aPosition);
  228.     void __fastcall SizeTo(int X, int Y);
  229.     void __fastcall SizeEnd(int X, int Y);
  230.     
  231. public:
  232.     __fastcall virtual TQRDesigner(Classes::TComponent* AOwner);
  233.     __fastcall virtual ~TQRDesigner(void);
  234.     void __fastcall AddComponent(System::TMetaClass* aNewComponentType);
  235.     void __fastcall AddIt(Controls::TWinControl* aParent, int X, int Y);
  236.     void __fastcall Edit(TQuickRep* AReport);
  237.     void __fastcall GetHandles(void);
  238.     void __fastcall SetFocusFrame(void);
  239.     void __fastcall StopEdit(void);
  240.     __property Controls::TControl* EditControl = {read=FEditControl, write=SetEditControl};
  241.     __property bool Editing = {read=FEditing, write=FEditing, nodefault};
  242.     __property bool IsAdding = {read=FIsAdding, nodefault};
  243.     __property Classes::TNotifyEvent OnSelectComponent = {read=FOnSelectComponent, write=SetOnSelectComponent
  244.         };
  245.     __property bool Sizing = {read=FSizing, write=FSizing, nodefault};
  246. };
  247.  
  248. typedef void __fastcall (__closure *TQRNotifyEvent)(TQuickRep* Sender);
  249.  
  250. enum TQuickReportOption { FirstPageHeader, LastPageFooter, Compression };
  251.  
  252. typedef Set<TQuickReportOption, FirstPageHeader, Compression>  TQuickReportOptions;
  253.  
  254. class DELPHICLASS TQRPage;
  255. class DELPHICLASS TQRUnitBase;
  256. class PASCALIMPLEMENTATION TQRUnitBase : public Classes::TPersistent 
  257. {
  258.     typedef Classes::TPersistent inherited;
  259.     
  260. private:
  261.     int FResolution;
  262.     TQRUnit FUnits;
  263.     TQRUnit SavedUnits;
  264.     TQuickRep* FParentReport;
  265.     bool FParentUpdating;
  266.     int FZoom;
  267.     virtual Extended __fastcall LoadUnit(Extended Value, TQRUnit aUnit, bool Horizontal);
  268.     virtual Extended __fastcall SaveUnit(Extended Value, TQRUnit aUnit, bool Horizontal);
  269.     
  270. protected:
  271.     virtual TQRUnit __fastcall GetUnits(void);
  272.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  273.     virtual void __fastcall Loaded(void);
  274.     virtual void __fastcall ReadValues(Classes::TReader* Reader);
  275.     virtual void __fastcall SetParentSizes(void);
  276.     virtual void __fastcall SetUnits(TQRUnit Value);
  277.     virtual void __fastcall WriteValues(Classes::TWriter* Writer);
  278.     void __fastcall SetPixels(void);
  279.     void __fastcall RestoreUnit(void);
  280.     
  281. public:
  282.     __fastcall TQRUnitBase(void);
  283.     __property TQuickRep* ParentReport = {read=FParentReport, write=FParentReport};
  284.     __property bool ParentUpdating = {read=FParentUpdating, write=FParentUpdating, nodefault};
  285.     __property int Resolution = {read=FResolution, nodefault};
  286.     __property TQRUnit Units = {read=GetUnits, write=SetUnits, nodefault};
  287.     __property int Zoom = {read=FZoom, write=FZoom, nodefault};
  288. public:
  289.     /* TPersistent.Destroy */ __fastcall virtual ~TQRUnitBase(void) { }
  290.     
  291. };
  292.  
  293. class PASCALIMPLEMENTATION TQRPage : public Quickrpt::TQRUnitBase 
  294. {
  295.     typedef Quickrpt::TQRUnitBase inherited;
  296.     
  297. private:
  298.     Extended FBottomMargin;
  299.     Extended FColumnSpace;
  300.     int FColumns;
  301.     Extended FLeftMargin;
  302.     Extended FLength;
  303.     TPrinterOrientation FOrientation;
  304.     TQRPaperSize FPaperSize;
  305.     Extended FRightMargin;
  306.     bool FRuler;
  307.     Extended FTopMargin;
  308.     Extended FWidth;
  309.     TQuickRep* Parent;
  310.     Qrprntr::TQRPaperSize __fastcall GetPaperSize(void);
  311.     bool __fastcall GetRuler(void);
  312.     Extended __fastcall GetValue(int Index);
  313.     void __fastcall SetColumns(int Value);
  314.     void __fastcall SetOrientation(Printers::TPrinterOrientation Value);
  315.     void __fastcall SetPaperSize(Qrprntr::TQRPaperSize Value);
  316.     void __fastcall SetRuler(bool Value);
  317.     void __fastcall SetValue(int Index, Extended Value);
  318.     
  319. protected:
  320.     virtual void __fastcall ReadValues(Classes::TReader* Reader);
  321.     virtual void __fastcall SetParentSizes(void);
  322.     virtual void __fastcall SetUnits(TQRUnit Value);
  323.     virtual void __fastcall WriteValues(Classes::TWriter* Writer);
  324.     void __fastcall FixZoom(void);
  325.     
  326. public:
  327.     __fastcall TQRPage(TQuickRep* AParent);
  328.     
  329. __published:
  330.     __property Extended BottomMargin = {read=GetValue, write=SetValue, stored=false, index=0};
  331.     __property Extended ColumnSpace = {read=GetValue, write=SetValue, stored=false, index=6};
  332.     __property int Columns = {read=FColumns, write=SetColumns, nodefault};
  333.     __property Extended LeftMargin = {read=GetValue, write=SetValue, stored=false, index=4};
  334.     __property Extended Length = {read=GetValue, write=SetValue, stored=false, index=1};
  335.     __property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=SetOrientation, nodefault
  336.         };
  337.     __property Qrprntr::TQRPaperSize PaperSize = {read=GetPaperSize, write=SetPaperSize, nodefault};
  338.     __property Extended RightMargin = {read=GetValue, write=SetValue, stored=false, index=5};
  339.     __property bool Ruler = {read=GetRuler, write=SetRuler, default=1};
  340.     __property Extended TopMargin = {read=GetValue, write=SetValue, stored=false, index=2};
  341.     __property Extended Width = {read=GetValue, write=SetValue, stored=false, index=3};
  342. public:
  343.     /* TPersistent.Destroy */ __fastcall virtual ~TQRPage(void) { }
  344.     
  345. };
  346.  
  347. class DELPHICLASS TQuickRepPrinterSettings;
  348. class PASCALIMPLEMENTATION TQuickRepPrinterSettings : public Qrprntr::TQRPrinterSettings 
  349. {
  350.     typedef Qrprntr::TQRPrinterSettings inherited;
  351.     
  352. __published:
  353.     __property Copies ;
  354.     __property Duplex ;
  355.     __property FirstPage ;
  356.     __property LastPage ;
  357.     __property OutputBin ;
  358. public:
  359.     /* TQRPrinterSettings.Create */ __fastcall TQuickRepPrinterSettings(void) : Qrprntr::TQRPrinterSettings(
  360.         ) { }
  361.     
  362. public:
  363.     /* TPersistent.Destroy */ __fastcall virtual ~TQuickRepPrinterSettings(void) { }
  364.     
  365. };
  366.  
  367. enum TQRState { qrAvailable, qrPrepare, qrPreview, qrPrint, qrEdit };
  368.  
  369. class DELPHICLASS TQRBand;
  370. class DELPHICLASS TQRPrintable;
  371. class PASCALIMPLEMENTATION TQuickRep : public Quickrpt::TQRBasePanel 
  372. {
  373.     typedef Quickrpt::TQRBasePanel inherited;
  374.     
  375. private:
  376.     TQRCreateReportThread* BGThread;
  377.     TQRController* aController;
  378.     Classes::TList* BandRegList;
  379.     Qrprntr::TQRAfterPrintEvent FAfterPrintEvent;
  380.     Qrprntr::TQRAfterPreviewEvent FAfterPreviewEvent;
  381.     Classes::TList* FAllDataSets;
  382.     bool FAvailable;
  383.     Classes::TList* FBandList;
  384.     TQuickRepBands* FBands;
  385.     TQRReportBeforePrintEvent FBeforePrintEvent;
  386.     int FColumnTopPosition;
  387.     int FCurrentColumn;
  388.     int FCurrentX;
  389.     int FCurrentY;
  390.     Classes::TStrings* FDescription;
  391.     TQRDesigner* FDesigner;
  392.     Qrprntr::TQRExportFilter* FExportFilter;
  393.     bool FExporting;
  394.     bool FFinalPass;
  395.     bool FHideBands;
  396.     bool FLastPage;
  397.     TQRNotifyEvent FOnEndPageEvent;
  398.     TQROnNeedDataEvent FOnNeedDataEvent;
  399.     Classes::TNotifyEvent FOnPreviewEvent;
  400.     TQRNotifyEvent FOnStartPageEvent;
  401.     TQuickReportOptions FOptions;
  402.     TQRPage* FPage;
  403.     int FPageCount;
  404.     Extended FPageFooterSize;
  405.     TQuickRepPrinterSettings* FPrinterSettings;
  406.     System::AnsiString FReportTitle;
  407.     int FRotateBands;
  408.     bool FShowProgress;
  409.     bool FSnapToGrid;
  410.     TQRState FState;
  411.     Qrprntr::TQRPrinter* FQRPrinter;
  412.     bool NewColumnForced;
  413.     bool NewPageForced;
  414.     int ReferenceDC;
  415.     TQRUnit __fastcall GetUnits(void);
  416.     Db::TDataSet* __fastcall GetDataSet(void);
  417.     bool __fastcall GetPrintIfEmpty(void);
  418.     int __fastcall GetRecordCount(void);
  419.     int __fastcall GetRecordNumber(void);
  420.     void __fastcall PrintBand(TQRCustomBand* ABand);
  421.     void __fastcall PrintPageBackground(void);
  422.     void __fastcall SetExportFilter(Qrprntr::TQRExportFilter* Value);
  423.     void __fastcall SetUnits(TQRUnit Value);
  424.     void __fastcall SetDataSet(Db::TDataSet* Value);
  425.     void __fastcall SetDescription(Classes::TStrings* Value);
  426.     void __fastcall SetPrintIfEmpty(bool Value);
  427.     void __fastcall SetPrinterValues(void);
  428.     
  429. protected:
  430.     int __fastcall AvailableSpace(void);
  431.     bool __fastcall PrepareQRPrinter(void);
  432.     void __fastcall CreateReport(bool CompositeReport);
  433.     void __fastcall ForceNewColumn(void);
  434.     void __fastcall ForceNewPage(void);
  435.     DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
  436.     virtual void __fastcall Loaded(void);
  437.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  438.         );
  439.     virtual void __fastcall PaintColumns(void);
  440.     virtual void __fastcall PaintMargins(void);
  441.     virtual void __fastcall PaintFrame(void);
  442.     virtual void __fastcall PaintRuler(TQRUnit Units);
  443.     void __fastcall PreviewFinished(System::TObject* Sender);
  444.     void __fastcall PrintFinished(System::TObject* Sender);
  445.     void __fastcall RebuildBandList(void);
  446.     void __fastcall RegisterBand(TQRCustomBand* aBand);
  447.     void __fastcall SetHideBands(bool Value);
  448.     void __fastcall SetRotateBands(int Value);
  449.     virtual void __fastcall SetZoom(int Value);
  450.     
  451. public:
  452.     __fastcall virtual TQuickRep(Classes::TComponent* AOwner);
  453.     __fastcall TQuickRep(Classes::TComponent* AOwner, int Dummy);
  454.     __fastcall virtual ~TQuickRep(void);
  455.     TQRBand* __fastcall CreateBand(Qrprntr::TQRBandType BandType);
  456.     int __fastcall TextHeight(Graphics::TFont* aFont, System::AnsiString aText);
  457.     int __fastcall TextWidth(Graphics::TFont* aFont, System::AnsiString aText);
  458.     void __fastcall AddBand(TQRCustomBand* aBand);
  459.     void __fastcall AddNotifyClient(TQRPrintable* Value);
  460.     void __fastcall Edit(TQRDesigner* ADesigner);
  461.     void __fastcall ExportToFilter(Qrprntr::TQRExportFilter* AFilter);
  462.     void __fastcall EndPage(void);
  463.     DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
  464.     DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
  465.         int Y);
  466.     void __fastcall NewColumn(void);
  467.     void __fastcall NewPage(void);
  468.     virtual void __fastcall Paint(void);
  469.     void __fastcall Print(void);
  470.     void __fastcall PrintBackground(void);
  471.     void __fastcall PrinterSetup(void);
  472.     void __fastcall Prepare(void);
  473.     void __fastcall Preview(void);
  474.     void __fastcall ResetPageFooterSize(void);
  475.     void __fastcall RemoveBand(TQRCustomBand* aBand);
  476.     void __fastcall SetBandValues(void);
  477.     virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
  478.     __property Classes::TList* AllDataSets = {read=FAllDataSets, write=FAllDataSets};
  479.     __property bool Available = {read=FAvailable, nodefault};
  480.     __property Classes::TList* BandList = {read=FBandList};
  481.     __property int ColumnTopPosition = {read=FColumnTopPosition, write=FColumnTopPosition, nodefault};
  482.     __property int CurrentColumn = {read=FCurrentColumn, nodefault};
  483.     __property int CurrentX = {read=FCurrentX, write=FCurrentX, nodefault};
  484.     __property int CurrentY = {read=FCurrentY, write=FCurrentY, nodefault};
  485.     __property TQRDesigner* Designer = {read=FDesigner};
  486.     __property Qrprntr::TQRExportFilter* ExportFilter = {read=FExportFilter, write=SetExportFilter};
  487.     __property bool Exporting = {read=FExporting, nodefault};
  488.     __property bool FinalPass = {read=FFinalPass, nodefault};
  489.     __property bool HideBands = {read=FHideBands, write=SetHideBands, nodefault};
  490.     __property int PageNumber = {read=FPageCount, nodefault};
  491.     __property Qrprntr::TQRPrinter* Printer = {read=FQRPrinter};
  492.     __property Qrprntr::TQRPrinter* QRPrinter = {read=FQRPrinter, write=FQRPrinter};
  493.     __property int RecordCount = {read=GetRecordCount, nodefault};
  494.     __property int RecordNumber = {read=GetRecordNumber, nodefault};
  495.     __property int RotateBands = {read=FRotateBands, write=SetRotateBands, nodefault};
  496.     __property TQRState State = {read=FState, write=FState, nodefault};
  497.     
  498. __published:
  499.     __property Qrprntr::TQRAfterPrintEvent AfterPrint = {read=FAfterPrintEvent, write=FAfterPrintEvent}
  500.         ;
  501.     __property Qrprntr::TQRAfterPreviewEvent AfterPreview = {read=FAfterPreviewEvent, write=FAfterPreviewEvent
  502.         };
  503.     __property TQuickRepBands* Bands = {read=FBands, write=FBands};
  504.     __property TQRReportBeforePrintEvent BeforePrint = {read=FBeforePrintEvent, write=FBeforePrintEvent
  505.         };
  506.     __property Db::TDataSet* DataSet = {read=GetDataSet, write=SetDataSet};
  507.     __property Classes::TStrings* Description = {read=FDescription, write=SetDescription};
  508.     __property Font ;
  509.     __property TQRNotifyEvent OnEndPage = {read=FOnEndPageEvent, write=FOnEndPageEvent};
  510.     __property TQROnNeedDataEvent OnNeedData = {read=FOnNeedDataEvent, write=FOnNeedDataEvent};
  511.     __property Classes::TNotifyEvent OnPreview = {read=FOnPreviewEvent, write=FOnPreviewEvent};
  512.     __property TQRNotifyEvent OnStartPage = {read=FOnStartPageEvent, write=FOnStartPageEvent};
  513.     __property TQuickReportOptions Options = {read=FOptions, write=FOptions, nodefault};
  514.     __property TQRPage* Page = {read=FPage, write=FPage};
  515.     __property bool PrintIfEmpty = {read=GetPrintIfEmpty, write=SetPrintIfEmpty, nodefault};
  516.     __property TQuickRepPrinterSettings* PrinterSettings = {read=FPrinterSettings, write=FPrinterSettings
  517.         };
  518.     __property System::AnsiString ReportTitle = {read=FReportTitle, write=FReportTitle};
  519.     __property bool ShowProgress = {read=FShowProgress, write=FShowProgress, default=1};
  520.     __property bool SnapToGrid = {read=FSnapToGrid, write=FSnapToGrid, nodefault};
  521.     __property TQRUnit Units = {read=GetUnits, write=SetUnits, stored=true, nodefault};
  522.     __property Zoom ;
  523. public:
  524.     /* TWinControl.CreateParented */ __fastcall TQuickRep(HWND ParentWindow) : Quickrpt::TQRBasePanel(ParentWindow
  525.         ) { }
  526.     
  527. };
  528.  
  529. class DELPHICLASS TQRBandSize;
  530. class PASCALIMPLEMENTATION TQRBandSize : public Quickrpt::TQRUnitBase 
  531. {
  532.     typedef Quickrpt::TQRUnitBase inherited;
  533.     
  534. private:
  535.     Extended FWidth;
  536.     Extended FLength;
  537.     TQRCustomBand* Parent;
  538.     Extended __fastcall GetValue(int Index);
  539.     void __fastcall SetValue(int Index, Extended Value);
  540.     
  541. protected:
  542.     virtual void __fastcall ReadValues(Classes::TReader* Reader);
  543.     virtual void __fastcall SetParentSizes(void);
  544.     virtual void __fastcall WriteValues(Classes::TWriter* Writer);
  545.     void __fastcall FixZoom(void);
  546.     
  547. public:
  548.     __fastcall TQRBandSize(TQRCustomBand* AParent);
  549.     __property Extended Length = {read=GetValue, write=SetValue, stored=false, index=0};
  550.     
  551. __published:
  552.     __property Extended Height = {read=GetValue, write=SetValue, stored=false, index=0};
  553.     __property Extended Width = {read=GetValue, write=SetValue, stored=false, index=1};
  554. public:
  555.     /* TPersistent.Destroy */ __fastcall virtual ~TQRBandSize(void) { }
  556.     
  557. };
  558.  
  559. class DELPHICLASS TQRChildBand;
  560. class PASCALIMPLEMENTATION TQRCustomBand : public Quickrpt::TQRBasePanel 
  561. {
  562.     typedef Quickrpt::TQRBasePanel inherited;
  563.     
  564. private:
  565.     Windows::TRect BandFrameRect;
  566.     bool ButtonDown;
  567.     int FExpanded;
  568.     int LastX;
  569.     int LastY;
  570.     Windows::TRect MoveRect;
  571.     TQRBandAfterPrintEvent FAfterPrintEvent;
  572.     bool FAlignToBottom;
  573.     TQRBandBeforePrintEvent FBeforePrintEvent;
  574.     bool FEnabled;
  575.     bool FForceNewColumn;
  576.     bool FForceNewPage;
  577.     TQRCustomBand* FLinkBand;
  578.     TQuickRep* FParentReport;
  579.     bool FParentUpdating;
  580.     TQRBandType FQRBandType;
  581.     int LoadedHeight;
  582.     TQRBandSize* FSize;
  583.     void __fastcall SetLinkBand(TQRCustomBand* Value);
  584.     TQRBandSize* __fastcall GetBandSize(void);
  585.     bool __fastcall GetHasChild(void);
  586.     TQRChildBand* __fastcall GetChild(void);
  587.     void __fastcall SetBandType(Qrprntr::TQRBandType Value);
  588.     void __fastcall SetHasChild(bool Value);
  589.     
  590. protected:
  591.     TQRUnit __fastcall GetUnits(void);
  592.     int __fastcall StretchHeight(bool IncludeNext);
  593.     void __fastcall AdvancePaper(void);
  594.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  595.     virtual void __fastcall Loaded(void);
  596.     void __fastcall MakeSpace(void);
  597.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  598.         );
  599.     virtual void __fastcall Paint(void);
  600.     virtual void __fastcall PaintRuler(TQRUnit Units);
  601.     void __fastcall Print(void);
  602.     virtual void __fastcall ReadAlign(Classes::TReader* Reader);
  603.     virtual void __fastcall ReadRuler(Classes::TReader* Reader);
  604.     virtual void __fastcall ReadLinkband(Classes::TReader* Reader);
  605.     void __fastcall ReleaseFocusFrame(void);
  606.     virtual void __fastcall SetParent(Controls::TWinControl* AParent);
  607.     void __fastcall SetBandSize(TQRBandSize* Value);
  608.     virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
  609.     void __fastcall SetUnits(TQRUnit Value);
  610.     virtual void __fastcall SetZoom(int Value);
  611.     virtual void __fastcall WriteDummy(Classes::TWriter* Writer);
  612.     __property int Expanded = {read=FExpanded, write=FExpanded, nodefault};
  613.     __property bool ParentUpdating = {read=FParentUpdating, write=FParentUpdating, nodefault};
  614.     __property TQRUnit Units = {read=GetUnits, write=SetUnits, nodefault};
  615.     
  616. public:
  617.     __fastcall virtual TQRCustomBand(Classes::TComponent* AOwner);
  618.     __fastcall virtual ~TQRCustomBand(void);
  619.     TQRPrintable* __fastcall AddPrintable(System::TMetaClass* PrintableClass);
  620.     bool __fastcall CanExpand(Extended Value);
  621.     bool __fastcall ExpandBand(Extended Value, Extended &NewTop, Extended &OfsX);
  622.     DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
  623.         int Y);
  624.     DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
  625.     DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
  626.         Y);
  627.     __property Qrprntr::TQRBandType BandType = {read=FQRBandType, write=SetBandType, nodefault};
  628.     __property TQRChildBand* ChildBand = {read=GetChild};
  629.     __property TQuickRep* ParentReport = {read=FParentReport, write=FParentReport};
  630.     __property TQRCustomBand* LinkBand = {read=FLinkBand, write=SetLinkBand};
  631.     
  632. __published:
  633.     __property TQRBandAfterPrintEvent AfterPrint = {read=FAfterPrintEvent, write=FAfterPrintEvent};
  634.     __property bool AlignToBottom = {read=FAlignToBottom, write=FAlignToBottom, nodefault};
  635.     __property TQRBandBeforePrintEvent BeforePrint = {read=FBeforePrintEvent, write=FBeforePrintEvent};
  636.         
  637.     __property Color ;
  638.     __property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
  639.     __property Font ;
  640.     __property bool ForceNewColumn = {read=FForceNewColumn, write=FForceNewColumn, nodefault};
  641.     __property bool ForceNewPage = {read=FForceNewPage, write=FForceNewPage, nodefault};
  642.     __property bool HasChild = {read=GetHasChild, write=SetHasChild, stored=false, nodefault};
  643.     __property ParentFont ;
  644.     __property TQRBandSize* Size = {read=GetBandSize, write=SetBandSize};
  645. public:
  646.     /* TWinControl.CreateParented */ __fastcall TQRCustomBand(HWND ParentWindow) : Quickrpt::TQRBasePanel(
  647.         ParentWindow) { }
  648.     
  649. };
  650.  
  651. class PASCALIMPLEMENTATION TQRController : public Classes::TComponent 
  652. {
  653.     typedef Classes::TComponent inherited;
  654.     
  655. private:
  656.     Classes::TComponent* FMaster;
  657.     Db::TDataSet* FDataSet;
  658.     TQRCustomBand* FDetail;
  659.     TQRCustomBand* FFooter;
  660.     TQRCustomBand* FHeader;
  661.     TQROnNeedDataEvent FOnNeedDataEvent;
  662.     int FDetailNumber;
  663.     TQuickRep* FParentReport;
  664.     bool FPrintBefore;
  665.     bool FPrintIfEmpty;
  666.     Classes::TComponent* FSelfCheck;
  667.     Classes::TList* GroupList;
  668.     Classes::TList* NotifyList;
  669.     Classes::TList* PrintAfterList;
  670.     Classes::TList* PrintBeforeList;
  671.     void __fastcall SetMaster(Classes::TComponent* Value);
  672.     bool __fastcall CheckGroups(void);
  673.     void __fastcall CheckLastGroupFooters(void);
  674.     void __fastcall PrintGroupHeaders(void);
  675.     void __fastcall PrintGroupFooters(void);
  676.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  677.         );
  678.     void __fastcall NotifyClients(TQRNotifyOperation Operation);
  679.     void __fastcall SetDataSet(Db::TDataSet* Value);
  680.     
  681. protected:
  682.     virtual void __fastcall SetPrintBefore(bool Value);
  683.     void __fastcall AddAfter(TQRController* aController);
  684.     void __fastcall RegisterBands(void);
  685.     void __fastcall AddBefore(TQRController* aController);
  686.     void __fastcall BuildTree(void);
  687.     void __fastcall Execute(void);
  688.     void __fastcall Prepare(void);
  689.     
  690. public:
  691.     __fastcall virtual TQRController(Classes::TComponent* AOwner);
  692.     __fastcall virtual ~TQRController(void);
  693.     void __fastcall AddNotifyClient(TQRPrintable* Value);
  694.     __property Db::TDataSet* DataSet = {read=FDataSet, write=SetDataSet};
  695.     __property int DetailNumber = {read=FDetailNumber, nodefault};
  696.     __property TQRCustomBand* Detail = {read=FDetail, write=FDetail};
  697.     __property TQRCustomBand* Footer = {read=FFooter, write=FFooter};
  698.     __property TQRCustomBand* Header = {read=FHeader, write=FHeader};
  699.     __property Classes::TComponent* Master = {read=FMaster, write=SetMaster};
  700.     __property TQROnNeedDataEvent OnNeedData = {read=FOnNeedDataEvent, write=FOnNeedDataEvent};
  701.     __property TQuickRep* ParentReport = {read=FParentReport, write=FParentReport};
  702.     __property bool PrintBefore = {read=FPrintBefore, write=SetPrintBefore, nodefault};
  703.     __property bool PrintIfEmpty = {read=FPrintIfEmpty, write=FPrintIfEmpty, nodefault};
  704.     __property Classes::TComponent* SelfCheck = {read=FSelfCheck, write=FSelfCheck};
  705. };
  706.  
  707. class PASCALIMPLEMENTATION TQRBand : public Quickrpt::TQRCustomBand 
  708. {
  709.     typedef Quickrpt::TQRCustomBand inherited;
  710.     
  711. __published:
  712.     __property BandType ;
  713. public:
  714.     /* TQRCustomBand.Create */ __fastcall virtual TQRBand(Classes::TComponent* AOwner) : Quickrpt::TQRCustomBand(
  715.         AOwner) { }
  716.     /* TQRCustomBand.Destroy */ __fastcall virtual ~TQRBand(void) { }
  717.     
  718. public:
  719.     /* TWinControl.CreateParented */ __fastcall TQRBand(HWND ParentWindow) : Quickrpt::TQRCustomBand(ParentWindow
  720.         ) { }
  721.     
  722. };
  723.  
  724. class PASCALIMPLEMENTATION TQRChildBand : public Quickrpt::TQRCustomBand 
  725. {
  726.     typedef Quickrpt::TQRCustomBand inherited;
  727.     
  728. private:
  729.     TQRCustomBand* FParentBand;
  730.     void __fastcall SetParentBand(TQRCustomBand* Value);
  731.     
  732. public:
  733.     __fastcall virtual TQRChildBand(Classes::TComponent* AOwner);
  734.     
  735. __published:
  736.     __property TQRCustomBand* ParentBand = {read=FParentBand, write=SetParentBand};
  737. public:
  738.     /* TQRCustomBand.Destroy */ __fastcall virtual ~TQRChildBand(void) { }
  739.     
  740. public:
  741.     /* TWinControl.CreateParented */ __fastcall TQRChildBand(HWND ParentWindow) : Quickrpt::TQRCustomBand(
  742.         ParentWindow) { }
  743.     
  744. };
  745.  
  746. class DELPHICLASS TQRControllerBand;
  747. class PASCALIMPLEMENTATION TQRControllerBand : public Quickrpt::TQRCustomBand 
  748. {
  749.     typedef Quickrpt::TQRCustomBand inherited;
  750.     
  751. private:
  752.     TQRController* FController;
  753.     Classes::TComponent* FMaster;
  754.     
  755. protected:
  756.     bool __fastcall GetPrintIfEmpty(void);
  757.     virtual void __fastcall RegisterBands(void);
  758.     virtual void __fastcall SetMaster(Classes::TComponent* Value);
  759.     virtual void __fastcall SetParent(Controls::TWinControl* AParent);
  760.     void __fastcall SetPrintIfEmpty(bool Value);
  761.     __property TQRController* Controller = {read=FController, write=FController};
  762.     
  763. public:
  764.     __fastcall virtual TQRControllerBand(Classes::TComponent* AOwner);
  765.     __fastcall virtual ~TQRControllerBand(void);
  766.     __property bool PrintIfEmpty = {read=GetPrintIfEmpty, write=SetPrintIfEmpty, nodefault};
  767.     
  768. __published:
  769.     __property Classes::TComponent* Master = {read=FMaster, write=SetMaster};
  770. public:
  771.     /* TWinControl.CreateParented */ __fastcall TQRControllerBand(HWND ParentWindow) : Quickrpt::TQRCustomBand(
  772.         ParentWindow) { }
  773.     
  774. };
  775.  
  776. class DELPHICLASS TQRSubDetailGroupBands;
  777. class DELPHICLASS TQRSubDetail;
  778. class PASCALIMPLEMENTATION TQRSubDetail : public Quickrpt::TQRControllerBand 
  779. {
  780.     typedef Quickrpt::TQRControllerBand inherited;
  781.     
  782. private:
  783.     TQRSubDetailGroupBands* FBands;
  784.     Db::TDataSet* __fastcall GetDataSet(void);
  785.     TQRCustomBand* __fastcall GetFooterBand(void);
  786.     TQRCustomBand* __fastcall GetHeaderBand(void);
  787.     TQROnNeedDataEvent __fastcall GetOnNeedData(void);
  788.     bool __fastcall GetPrintBefore(void);
  789.     void __fastcall SetDataSet(Db::TDataSet* Value);
  790.     void __fastcall SetFooterBand(TQRCustomBand* Value);
  791.     void __fastcall SetHeaderBand(TQRCustomBand* Value);
  792.     void __fastcall SetOnNeedData(TQROnNeedDataEvent Value);
  793.     void __fastcall SetPrintBefore(bool Value);
  794.     
  795. protected:
  796.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  797.         );
  798.     virtual void __fastcall RegisterBands(void);
  799.     
  800. public:
  801.     __fastcall virtual TQRSubDetail(Classes::TComponent* AOwner);
  802.     __fastcall virtual ~TQRSubDetail(void);
  803.     void __fastcall AddNotifyClient(TQRPrintable* Value);
  804.     
  805. __published:
  806.     __property TQRSubDetailGroupBands* Bands = {read=FBands, write=FBands};
  807.     __property Db::TDataSet* DataSet = {read=GetDataSet, write=SetDataSet};
  808.     __property TQRCustomBand* FooterBand = {read=GetFooterBand, write=SetFooterBand};
  809.     __property TQRCustomBand* HeaderBand = {read=GetHeaderBand, write=SetHeaderBand};
  810.     __property TQROnNeedDataEvent OnNeedData = {read=GetOnNeedData, write=SetOnNeedData};
  811.     __property bool PrintBefore = {read=GetPrintBefore, write=SetPrintBefore, nodefault};
  812.     __property PrintIfEmpty ;
  813. public:
  814.     /* TWinControl.CreateParented */ __fastcall TQRSubDetail(HWND ParentWindow) : Quickrpt::TQRControllerBand(
  815.         ParentWindow) { }
  816.     
  817. };
  818.  
  819. class PASCALIMPLEMENTATION TQRSubDetailGroupBands : public Classes::TPersistent 
  820. {
  821.     typedef Classes::TPersistent inherited;
  822.     
  823. private:
  824.     TQRSubDetail* Owner;
  825.     TQRCustomBand* __fastcall GetFooterBand(void);
  826.     bool __fastcall GetHasFooter(void);
  827.     bool __fastcall GetHasHeader(void);
  828.     TQRCustomBand* __fastcall GetHeaderBand(void);
  829.     void __fastcall SetHasFooter(bool Value);
  830.     void __fastcall SetHasHeader(bool Value);
  831.     
  832. public:
  833.     __fastcall TQRSubDetailGroupBands(TQRSubDetail* AOwner);
  834.     __property TQRCustomBand* FooterBand = {read=GetFooterBand};
  835.     __property TQRCustomBand* HeaderBand = {read=GetHeaderBand};
  836.     
  837. __published:
  838.     __property bool HasFooter = {read=GetHasFooter, write=SetHasFooter, stored=false, nodefault};
  839.     __property bool HasHeader = {read=GetHasHeader, write=SetHasHeader, stored=false, nodefault};
  840. public:
  841.         
  842.     /* TPersistent.Destroy */ __fastcall virtual ~TQRSubDetailGroupBands(void) { }
  843.     
  844. };
  845.  
  846. class DELPHICLASS TQRGroup;
  847. class PASCALIMPLEMENTATION TQRGroup : public Quickrpt::TQRCustomBand 
  848. {
  849.     typedef Quickrpt::TQRCustomBand inherited;
  850.     
  851. private:
  852.     Qrprntr::TQREvaluator* Evaluator;
  853.     System::AnsiString FExpression;
  854.     TQRBand* FFooterBand;
  855.     Classes::TComponent* FMaster;
  856.     bool FReprint;
  857.     Qrprntr::TQREvResult GroupValue;
  858.     bool HasResult;
  859.     void __fastcall SetFooterBand(TQRBand* Value);
  860.     void __fastcall SetMaster(Classes::TComponent* Value);
  861.     
  862. protected:
  863.     __property bool Reprint = {read=FReprint, write=FReprint, nodefault};
  864.     void __fastcall Check(void);
  865.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  866.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  867.         );
  868.     void __fastcall Prepare(void);
  869.     virtual void __fastcall ReadValues(Classes::TReader* Reader);
  870.     virtual void __fastcall ReadDataSource(Classes::TReader* Reader);
  871.     virtual void __fastcall ReadDataField(Classes::TReader* Reader);
  872.     virtual void __fastcall ReadHeaderBand(Classes::TReader* Reader);
  873.     virtual void __fastcall ReadOnNeedData(Classes::TReader* Reader);
  874.     void __fastcall SetExpression(System::AnsiString Value);
  875.     virtual void __fastcall SetParent(Controls::TWinControl* AParent);
  876.     void __fastcall Unprepare(void);
  877.     virtual void __fastcall WriteValues(Classes::TWriter* Writer);
  878.     
  879. public:
  880.     __fastcall virtual TQRGroup(Classes::TComponent* AOwner);
  881.     __fastcall virtual ~TQRGroup(void);
  882.     
  883. __published:
  884.     __property System::AnsiString Expression = {read=FExpression, write=SetExpression};
  885.     __property TQRBand* FooterBand = {read=FFooterBand, write=SetFooterBand};
  886.     __property Classes::TComponent* Master = {read=FMaster, write=SetMaster};
  887. public:
  888.     /* TWinControl.CreateParented */ __fastcall TQRGroup(HWND ParentWindow) : Quickrpt::TQRCustomBand(ParentWindow
  889.         ) { }
  890.     
  891. };
  892.  
  893. class DELPHICLASS TQRPrintableSize;
  894. class PASCALIMPLEMENTATION TQRPrintableSize : public Quickrpt::TQRUnitBase 
  895. {
  896.     typedef Quickrpt::TQRUnitBase inherited;
  897.     
  898. private:
  899.     Extended FHeight;
  900.     Extended FLeft;
  901.     Extended FTop;
  902.     Extended FWidth;
  903.     TQRPrintable* Parent;
  904.     Extended __fastcall GetValue(int Index);
  905.     void __fastcall SetValue(int Index, Extended Value);
  906.     
  907. protected:
  908.     virtual void __fastcall SetParentSizes(void);
  909.     virtual void __fastcall ReadValues(Classes::TReader* Reader);
  910.     virtual void __fastcall WriteValues(Classes::TWriter* Writer);
  911.     void __fastcall FixZoom(void);
  912.     
  913. public:
  914.     __fastcall TQRPrintableSize(TQRPrintable* AParent);
  915.     
  916. __published:
  917.     __property Extended Height = {read=GetValue, write=SetValue, stored=false, index=0};
  918.     __property Extended Left = {read=GetValue, write=SetValue, stored=false, index=1};
  919.     __property Extended Top = {read=GetValue, write=SetValue, stored=false, index=2};
  920.     __property Extended Width = {read=GetValue, write=SetValue, stored=false, index=3};
  921. public:
  922.     /* TPersistent.Destroy */ __fastcall virtual ~TQRPrintableSize(void) { }
  923.     
  924. };
  925.  
  926. class PASCALIMPLEMENTATION TQRPrintable : public Controls::TCustomControl 
  927. {
  928.     typedef Controls::TCustomControl inherited;
  929.     
  930. private:
  931.     bool AlignUpdating;
  932.     TAlignment FAlignment;
  933.     bool FAlignToBand;
  934.     bool ButtonDown;
  935.     TQRFrame* FFrame;
  936.     bool FIsPrinting;
  937.     TQuickRep* FParentReport;
  938.     Qrprntr::TQRPrinter* FQRPrinter;
  939.     TQRPrintableSize* FSize;
  940.     int LastX;
  941.     int LastY;
  942.     int LoadedTop;
  943.     int LoadedWidth;
  944.     int LoadedHeight;
  945.     int LoadedLeft;
  946.     bool __fastcall GetTransparent(void);
  947.     void __fastcall SetTransparent(bool Value);
  948.     int __fastcall GetZoom(void);
  949.     void __fastcall SetAlignToBand(bool Value);
  950.     void __fastcall SetFrame(TQRFrame* Value);
  951.     
  952. protected:
  953.     virtual void __fastcall AlignIt(void);
  954.     virtual void __fastcall Loaded(void);
  955.     DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
  956.         int Y);
  957.     DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
  958.     DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
  959.         Y);
  960.     void __fastcall PaintCorners(void);
  961.     virtual void __fastcall SetParent(Controls::TWinControl* AParent);
  962.     void __fastcall SetZoom(int Value);
  963.     virtual void __fastcall Paint(void);
  964.     virtual void __fastcall Prepare(void);
  965.     virtual void __fastcall Print(int OfsX, int OfsY);
  966.     virtual void __fastcall QRNotification(System::TObject* Sender, TQRNotifyOperation Operation);
  967.     void __fastcall ReleaseFocusFrame(void);
  968.     virtual void __fastcall SetAlignment(Classes::TAlignment Value);
  969.     virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
  970.     virtual void __fastcall UnPrepare(void);
  971.     __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, nodefault};
  972.     __property bool AlignToBand = {read=FAlignToBand, write=SetAlignToBand, nodefault};
  973.     __property bool IsPrinting = {read=FIsPrinting, write=FIsPrinting, nodefault};
  974.     __property Qrprntr::TQRPrinter* QRPrinter = {read=FQRPrinter, write=FQRPrinter};
  975.     __property bool Transparent = {read=GetTransparent, write=SetTransparent, nodefault};
  976.     
  977. public:
  978.     __fastcall virtual TQRPrintable(Classes::TComponent* AOwner);
  979.     __fastcall virtual ~TQRPrintable(void);
  980.     __property TQuickRep* ParentReport = {read=FParentReport, write=FParentReport};
  981.     __property int Zoom = {read=GetZoom, write=SetZoom, nodefault};
  982.     
  983. __published:
  984.     __property Enabled ;
  985.     __property TQRFrame* Frame = {read=FFrame, write=SetFrame};
  986.     __property TQRPrintableSize* Size = {read=FSize, write=FSize};
  987. public:
  988.     /* TWinControl.CreateParented */ __fastcall TQRPrintable(HWND ParentWindow) : Controls::TCustomControl(
  989.         ParentWindow) { }
  990.     
  991. };
  992.  
  993. class DELPHICLASS TQRCompositeReport;
  994. class PASCALIMPLEMENTATION TQRCompositeReport : public Classes::TComponent 
  995. {
  996.     typedef Classes::TComponent inherited;
  997.     
  998. private:
  999.     Classes::TNotifyEvent FOnAddReports;
  1000.     Classes::TNotifyEvent FOnFinished;
  1001.     TQuickReportOptions FOptions;
  1002.     TQuickRepPrinterSettings* FPrinterSettings;
  1003.     Qrprntr::TQRPrinter* FQRPrinter;
  1004.     Classes::TList* FReports;
  1005.     System::AnsiString FReportTitle;
  1006.     void __fastcall CreateComposite(void);
  1007.     
  1008. public:
  1009.     __fastcall virtual TQRCompositeReport(Classes::TComponent* AOwner);
  1010.     __fastcall virtual ~TQRCompositeReport(void);
  1011.     void __fastcall Prepare(void);
  1012.     void __fastcall Preview(void);
  1013.     void __fastcall Print(void);
  1014.     __property Classes::TList* Reports = {read=FReports, write=FReports};
  1015.     
  1016. __published:
  1017.     __property Classes::TNotifyEvent OnAddReports = {read=FOnAddReports, write=FOnAddReports};
  1018.     __property Classes::TNotifyEvent OnFinished = {read=FOnFinished, write=FOnFinished};
  1019.     __property TQuickReportOptions Options = {read=FOptions, write=FOptions, nodefault};
  1020.     __property TQuickRepPrinterSettings* PrinterSettings = {read=FPrinterSettings, write=FPrinterSettings
  1021.         };
  1022.     __property System::AnsiString ReportTitle = {read=FReportTitle, write=FReportTitle};
  1023. };
  1024.  
  1025. class PASCALIMPLEMENTATION TControlHandle : public Controls::TCustomControl 
  1026. {
  1027.     typedef Controls::TCustomControl inherited;
  1028.     
  1029. private:
  1030.     THandlePosition FPosition;
  1031.     TQRDesigner* QRDesigner;
  1032.     void __fastcall SetPosition(THandlePosition Value);
  1033.     void __fastcall SetPos(int x, int y);
  1034.     tagPOINT __fastcall GetCenter(void);
  1035.     
  1036. protected:
  1037.     DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
  1038.         int Y);
  1039.     DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
  1040.     DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
  1041.         Y);
  1042.     virtual void __fastcall SetParent(Controls::TWinControl* aParent);
  1043.     
  1044. public:
  1045.     __fastcall virtual TControlHandle(TQRDesigner* aQRDesigner, THandlePosition aPosition);
  1046.     HIDESBASE void __fastcall Hide(void);
  1047.     HIDESBASE void __fastcall Show(void);
  1048.     virtual void __fastcall Paint(void);
  1049.     __property THandlePosition Position = {read=FPosition, write=SetPosition, nodefault};
  1050.     __property tagPOINT Center = {read=GetCenter};
  1051. public:
  1052.     /* TCustomControl.Create */ __fastcall virtual TControlHandle(Classes::TComponent* AOwner) : Controls::
  1053.         TCustomControl(AOwner) { }
  1054.     /* TCustomControl.Destroy */ __fastcall virtual ~TControlHandle(void) { }
  1055.     
  1056. public:
  1057.     /* TWinControl.CreateParented */ __fastcall TControlHandle(HWND ParentWindow) : Controls::TCustomControl(
  1058.         ParentWindow) { }
  1059.     
  1060. };
  1061.  
  1062. enum TQRPrintOrder { qrColByCol, qrRowByRow };
  1063.  
  1064. typedef void __fastcall (__closure *TQRFilterEvent)(bool &PrintRecord);
  1065.  
  1066. enum TQR1PaperSize { qrpDefault, qrpLetter, qrpLegal, qrpA3, qrpA4, qrpA5, qrpCustom };
  1067.  
  1068. class DELPHICLASS TQuickReport;
  1069. class PASCALIMPLEMENTATION TQuickReport : public Quickrpt::TQuickRep 
  1070. {
  1071.     typedef Quickrpt::TQuickRep inherited;
  1072.     
  1073. private:
  1074.     Classes::TNotifyEvent FAfterDetail;
  1075.     Classes::TNotifyEvent FAfterPrint;
  1076.     Classes::TNotifyEvent FBeforeDetail;
  1077.     TQRReportBeforePrintEvent FBeforePrint;
  1078.     int FColumnMarginInches;
  1079.     int FColumnMarginMM;
  1080.     int FColumns;
  1081.     Db::TDataSource* FDataSource;
  1082.     bool FDisplayPrintDialog;
  1083.     int FLeftMarginInches;
  1084.     int FLeftMarginMM;
  1085.     Classes::TNotifyEvent FOnEndPage;
  1086.     Classes::TNotifyEvent FOnStartPage;
  1087.     TQRFilterEvent FOnFilterEvent;
  1088.     TPrinterOrientation FOrientation;
  1089.     TQRFrame* FPageFrame;
  1090.     int FPaperLength;
  1091.     TQR1PaperSize FPaperSize;
  1092.     int FPaperWidth;
  1093.     TQRPrintOrder FPrintOrder;
  1094.     System::AnsiString FReportTitle;
  1095.     bool FRestartData;
  1096.     bool FShowProgress;
  1097.     bool FSQLCompatible;
  1098.     bool FTitleBeforeHD;
  1099.     
  1100. protected:
  1101.     virtual void __fastcall Loaded(void);
  1102.     
  1103. public:
  1104.     __fastcall virtual TQuickReport(Classes::TComponent* AOwner);
  1105.     __fastcall virtual ~TQuickReport(void);
  1106.     
  1107. __published:
  1108.     __property Classes::TNotifyEvent AfterDetail = {read=FAfterDetail, write=FAfterDetail};
  1109.     __property Classes::TNotifyEvent AfterPrint = {read=FAfterPrint, write=FAfterPrint};
  1110.     __property Classes::TNotifyEvent BeforeDetail = {read=FBeforeDetail, write=FBeforeDetail};
  1111.     __property TQRReportBeforePrintEvent BeforePrint = {read=FBeforePrint, write=FBeforePrint};
  1112.     __property int ColumnMarginInches = {read=FColumnMarginInches, write=FColumnMarginInches, nodefault
  1113.         };
  1114.     __property int ColumnMarginMM = {read=FColumnMarginMM, write=FColumnMarginMM, nodefault};
  1115.     __property int Columns = {read=FColumns, write=FColumns, nodefault};
  1116.     __property Db::TDataSource* DataSource = {read=FDataSource, write=FDataSource};
  1117.     __property bool DisplayPrintDialog = {read=FDisplayPrintDialog, write=FDisplayPrintDialog, nodefault
  1118.         };
  1119.     __property int LeftMarginInches = {read=FLeftMarginInches, write=FLeftMarginInches, nodefault};
  1120.     __property int LeftMarginMM = {read=FLeftMarginMM, write=FLeftMarginMM, nodefault};
  1121.     __property Classes::TNotifyEvent OnEndPage = {read=FOnEndPage, write=FOnEndPage};
  1122.     __property Classes::TNotifyEvent OnStartPage = {read=FOnStartPage, write=FOnStartPage};
  1123.     __property Printers::TPrinterOrientation Orientation = {read=FOrientation, write=FOrientation, nodefault
  1124.         };
  1125.     __property TQRFrame* PageFrame = {read=FPageFrame, write=FPageFrame};
  1126.     __property int PaperLength = {read=FPaperLength, write=FPaperLength, nodefault};
  1127.     __property TQR1PaperSize PaperSize = {read=FPaperSize, write=FPaperSize, nodefault};
  1128.     __property int PaperWidth = {read=FPaperWidth, write=FPaperWidth, nodefault};
  1129.     __property TQRPrintOrder PrintOrder = {read=FPrintOrder, write=FPrintOrder, nodefault};
  1130.     __property System::AnsiString ReportTitle = {read=FReportTitle, write=FReportTitle};
  1131.     __property bool RestartData = {read=FRestartData, write=FRestartData, nodefault};
  1132.     __property bool ShowProgress = {read=FShowProgress, write=FShowProgress, default=1};
  1133.     __property bool SQLCompatible = {read=FSQLCompatible, write=FSQLCompatible, nodefault};
  1134.     __property bool TitleBeforeHeader = {read=FTitleBeforeHD, write=FTitleBeforeHD, nodefault};
  1135.     __property TQRFilterEvent OnFilter = {read=FOnFilterEvent, write=FOnFilterEvent};
  1136. public:
  1137.     /* TQuickRep.CreateNew */ __fastcall TQuickReport(Classes::TComponent* AOwner, int Dummy) : Quickrpt::
  1138.         TQuickRep(AOwner, Dummy) { }
  1139.     
  1140. public:
  1141.     /* TWinControl.CreateParented */ __fastcall TQuickReport(HWND ParentWindow) : Quickrpt::TQuickRep(ParentWindow
  1142.         ) { }
  1143.     
  1144. };
  1145.  
  1146. class DELPHICLASS TQRDetailLink;
  1147. class PASCALIMPLEMENTATION TQRDetailLink : public Quickrpt::TQRSubDetail 
  1148. {
  1149.     typedef Quickrpt::TQRSubDetail inherited;
  1150.     
  1151. private:
  1152.     System::AnsiString DataSourceName;
  1153.     System::AnsiString DetailBandName;
  1154.     
  1155. protected:
  1156.     virtual void __fastcall Loaded(void);
  1157.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  1158.     virtual void __fastcall ReadDataSource(Classes::TReader* Reader);
  1159.     virtual void __fastcall ReadDetailBand(Classes::TReader* Reader);
  1160.     virtual void __fastcall ReadOnFilter(Classes::TReader* Reader);
  1161.     void __fastcall WriteValues(Classes::TWriter* Writer);
  1162. public:
  1163.     /* TQRSubDetail.Create */ __fastcall virtual TQRDetailLink(Classes::TComponent* AOwner) : Quickrpt::
  1164.         TQRSubDetail(AOwner) { }
  1165.     /* TQRSubDetail.Destroy */ __fastcall virtual ~TQRDetailLink(void) { }
  1166.     
  1167. public:
  1168.     /* TWinControl.CreateParented */ __fastcall TQRDetailLink(HWND ParentWindow) : Quickrpt::TQRSubDetail(
  1169.         ParentWindow) { }
  1170.     
  1171. };
  1172.  
  1173. //-- var, const, procedure ---------------------------------------------------
  1174. extern PACKAGE System::AnsiString __fastcall UniqueName(Classes::TComponent* AComponent, System::AnsiString 
  1175.     Start);
  1176. extern PACKAGE void __fastcall SetQRHiColor(void);
  1177. extern PACKAGE void __fastcall SetQRLoColor(void);
  1178.  
  1179. }    /* namespace Quickrpt */
  1180. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  1181. using namespace Quickrpt;
  1182. #endif
  1183. //-- end unit ----------------------------------------------------------------
  1184. #endif    // quickrpt
  1185.